package cn.hellochaos.generator.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 主表：菜谱列表
 * </p>
 *
 * @author test
 * @since 2021-01-23
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CaipuList extends Model<CaipuList> {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 分类标签
     */
    private String fenleiTag;

    /**
     * 菜谱编号
     */
    @TableId(value = "id_cookbook", type = IdType.AUTO)
    private Integer idCookbook;

    /**
     * 菜谱名称
     */
    private String cookbookName;

    /**
     * 查看次数
     */
    private Integer views;

    /**
     * 收藏喜欢次数
     */
    private Integer favorite;

    /**
     * 难度等级
     */
    private String level;

    /**
     * 做菜的时间，需要的时间周期
     */
    private String duration;

    /**
     * 列表图
     */
    private String imgList;

    /**
     * 标签
     */
    private String tags;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;


    @Override
    protected Serializable pkVal() {
        return this.idCookbook;
    }

}
